<template>
  <a-affix
    :offset-bottom="offsetBottom"
    :offset-top="offsetTop"
    :target="target"
  >
    <slot />
  </a-affix>
</template>

<script>
import { defineComponent } from 'vue'
import { Affix } from 'ant-design-vue'
export default defineComponent({
  name: 'ZAffix',
  components: {
    AAffix: Affix
  },
  props: {
    offsetBottom: {
      type: Number,
      default: undefined
    },
    offsetTop: {
      type: Number,
      default: 0
    },
    target: {
      type: Function,
      default: undefined
    }
  }
})
</script>
